<?php
class Core_Data_Userexists {
	
	/**
	 * 
	 * database connction
	 * 
	 * @var $database
	 */
	public $database;
	
	/**
	 * constructor
	 */
	public function __construct(){
		
		$this->database = new Core_Driver_MysqlImproved();
		
	}
	
	public function userValidation($username){
		
		$this->database->connect();
		$username = $this->database->escape($username);
		$this->database->prepare(
			"
				SELECT
				user_settings.user_username,
				user_settings.user_banned
				FROM
				user_settings
				WHERE
				user_settings.user_username = '$username'
				LIMIT
				1
				;
				"
		);
		$this->database->query();
		$userData = $this->database->fetch('array');
		return $userData;
		
	}
}